package com.shen.educms.controller;

import com.shen.commonutils.Result;
import com.shen.educms.entity.CrmBanner;
import com.shen.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/educms/crmbannerfront")
public class BannerFrontController {
    @Autowired
    CrmBannerService bannerService;
    //显示数据就行 不需要分页 查询所有banner
    @GetMapping("getAllBanner")
    public Result getAllBanner(){
        List<CrmBanner> list=bannerService.selectAllBanner();
        return  Result.ok().data("list",list);
    }
}
